<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="../includes/common.jsp" %>

<form action="${scriptPath}">

	<input type="hidden" name="action" value="exam.view"></input>
	<input type="hidden" name="ev_id" value="${exam.id}"></input>

    <div>
		<jsp:include page="exam.view-toolbar.jsp"></jsp:include>
		
		<div style="clear: both">
			<h3>${exam.name}</h3>
			<p>Đề bài: <b><a href="${scriptPath}?action=test.view&tv_id=${exam.test.id}">
			    ${exam.test.name}</a></b></p>
			<p>Ngày thi: <b>${exam.date}</b></p>
			<p>Lớp: <b>${exam.clazz}</b></p>
		</div>
	</div>
	
	<table>
	<tr>
		<th width="20px">&nbsp;</th>
		<th>Họ tên</th>
	    <th>SHSV</th>
	    <th width="100px">Ngày sinh</th>
	    <th width="60px">Mã đề</th> 
	    <th width="50px">Điểm</th>
	</tr>
	<c:forEach items="${exam.marks}" var="mark">
	<tr>
	    <td><input type="checkbox" name="ev_marks" value="${mark.id}"></input></td>
	    <td><a href="${scriptPath}?action=mark.view&mv_id=${mark.id}">${mark.studentSurname} ${mark.studentName}</a></td>
	    <td align="center">${mark.studentId}</td>
	    <td align="center">${empty mark.studentBirthday ? '' : u:formatDate(mark.studentBirthday)}</td>
	    <td align="center">${u:defaultIfNull(mark.testVersion.code, '&lt;không tên&gt;')}</td>
	    <td align="right">${u:round(mark.mark*100)}%</td>
	</tr>
	</c:forEach>
	<tr>
	</tr>
	</table>
	
	<jsp:include page="exam.view-toolbar.jsp"></jsp:include>

</form>